<?php 
if(isset($_SESSION['config_template']))
{
	if($_SESSION['config_template']=='layoutmain_web1')
	{
		?>
		<h3><?php echo $this->text_historyorder ?></h3>
		<div class="line"><hr></div>
		<table cellspacing="0" border="0" class="data-table box-table shopping-cart">
			<tbody>
			<tr class="first last" style="padding:8px;">
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_no ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_billcode ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_createddate ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_productkinds ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_totalbillprice ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;"><?php echo $this->text_status ?></th>
				<th style=" padding:8px; text-align:center; background-color:#EEEEEE; font-size:15px;">&nbsp;</th>
			</tr>
			<?php $no=1; ?>
			<?php if (count($this->userBills)!=0) {?>
			<?php foreach($this->userBills as $userBill) { ?>
			<tr class="first odd" style="color:black;">
				<td align="center" style=" text-align:center;"><?php echo $no;?></td>
				<td align="center" style=" text-align:center;"><?php echo $userBill["bill_code"] ?></td>
				<td align="center" style=" text-align:center;"><?php echo $userBill["created_date"] ?></td>
				<td align="center" style=" text-align:center;"><?php echo $userBill["kinds_product"] ?></td>
				<td align="center" style=" text-align:center;">$<?php echo number_format($userBill["total_bill_price"]) ?></td>
				<td align="center" style=" text-align:center;"><?php echo $userBill["status"] ?></td>
				<td align="center" style=" text-align:center;"><a style="color:black; text-decoration:underline;" href="/account/billorderdetail/?bill=<?php echo $userBill["bill_id"] ?>"><?php echo $this->text_viewdetail ?></a></td>
			</tr>
			<?php $no++; ?>
			<?php } } else {?>
			<tr >
				<td colspan="6" align="center" style="background-color:#EEEEEE"><?php echo $this->text_nothavebill ?></td>
			</tr>
			<?php } ?>
			<tr >
				<td colspan="7" style=" background-color:#EEEEEE">&nbsp;</td>
			</tr>
			</tbody>
		</table>
		<div style="width:100%;height:20px; clear:both">&nbsp;</div>
		<a href="http://cms/account/" style="font-size:13px; text-decoration:underline; color:blue;">&lt;&lt;&nbsp;<?php echo $this->text_profilelink ?></a>﻿﻿	
		<?php 
	}
	else 
	{
		if($_SESSION['config_template']=='layoutmain_web2')
		{?>
		
			<!-- start center -->
					<div id="main" class="col-main">
						<div class="my-account">
							<div class="my-account">
								<div class="page-title">
									<h1><?php echo $this->text_historyorder ?></h1>
								</div>
								
								<table class="data-table" id="my-orders-table">
									<colgroup>
									<col width="1">
									<col width="1">
									<col>
									<col width="1">
									<col width="1">
									<col width="1">
									</colgroup>
									<thead>
										<tr class="first last">
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_no ?></th>
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_billcode ?></th>
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_createddate ?></th>
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_productkinds ?></th>
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_totalbillprice ?></th>
											<th style="padding:8px; font-size:14px;"><?php echo $this->text_status ?></th>
											<th>&nbsp;</th>
										</tr>
									</thead>
									<tbody>
									<?php $no=1; ?>
									<?php if (count($this->userBills)!=0) {?>
									<?php foreach($this->userBills as $userBill) { ?>			
										<tr style="color:black;">
											<td><?php echo $no;?></td>
											<td><?php echo $userBill["bill_code"] ?></td>
											<td><span class="nobr"><?php echo $userBill["created_date"] ?></span></td>
											<td><?php echo $userBill["kinds_product"] ?></td>
											<td>$<?php echo number_format($userBill["total_bill_price"]) ?></td>
											<td><?php echo $userBill["status"] ?></td>
											<td><span class="nobr">
													<a href="/account/billorderdetail/?bill=<?php echo $userBill["bill_id"] ?>"><?php echo $this->text_viewdetail ?></a>
												</span></td>
										</tr>							
			<?php $no++; ?>
			<?php } } else {?>
			<tr>
				<td colspan="6" align="center" style="background-color:#E5E5E5"><?php echo $this->text_nothavebill ?></td>
			</tr>
			<?php } ?>
									</tbody>
								</table>
								<script type="text/javascript">decorateTable('my-orders-table');</script>
								<div class="buttons-set">
									<p class="back-link"><a href="http://demo.mage-world.com/1402/az_shop_pink/"><small>« </small>Back</a></p>
								</div>
							</div>
						</div>
					</div>
					<!-- end center -->
				
		<?php }
		else 
		{?>
<p><?php echo $this->text_historyorder ?></p>
<div class="line"><hr></div>
<table border="0" style="width:100%; font-size:13px;">
	<tr>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_no ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_billcode ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_createddate ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_productkinds ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_totalbillprice ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;"><?php echo $this->text_status ?></th>
		<th style="border:1px black solid; background-color:#CFCFCF; padding:8px;font-size:15px;">&nbsp;</th>
	</tr>
	<?php $no=1; ?>
	<?php if (count($this->userBills)!=0) {?>
	<?php foreach($this->userBills as $userBill) { ?>
	<tr>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><?php echo $no;?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><?php echo $userBill["bill_code"] ?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><?php echo $userBill["created_date"] ?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><?php echo $userBill["kinds_product"] ?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;">$<?php echo number_format($userBill["total_bill_price"]) ?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><?php echo $userBill["status"] ?></td>
		<td align="center" style="background-color:#E5E5E5; padding:5px;"><a style="color:black; text-decoration:underline;" href="/account/billorderdetail/?bill=<?php echo $userBill["bill_id"] ?>"><?php echo $this->text_viewdetail ?></a></td>
	</tr>
	<?php $no++; ?>
	<?php } } else {?>
	<tr>
		<td colspan="6" align="center" style="background-color:#E5E5E5"><?php echo $this->text_nothavebill ?></td>
	</tr>
	<?php } ?>
	<tr>
		<td colspan="7" style="border:1px black solid; background-color:#CFCFCF">&nbsp;</td>
	</tr>
</table>
<div style="width:100%;height:20px; clear:both">&nbsp;</div>
<a href="/account/" style="font-size:13px; text-decoration:underline; color:blue;">&lt;&lt;&nbsp;<?php echo $this->text_profilelink ?></a>

<?php }
	}
}?>